{% extends 'base.html' %}

{% block title %}Cuestionario: {{ title|escape }}{% endblock %}

{% block breadcrum %}
<p class="bread">
    Ir a: <a class="bread" href="/home/">Inicio</a> /
    <a class="bread" href="/my_forms/">Mis cuestionarios</a> /
</p>
{% endblock %}

{% block body %}
        {% if valid %}
            <h3>Cuestionario: {{ title|escape }}</h3>
            <table>
                <tr><th>Preguntas en tu cuestionario:</th></tr>
                {% for i in questions %}
                <tr>
                    <td><a href="/edit_question/{{ myform }}/{{ i.0 }}/">{{ i.1|escape }}</a>
                            <a class="crud" href="/update_question/{{ myform }}/{{i.0}}/">[Actualizar]</a>
                            <a class="crud" href="/delete_question/{{ myform }}/{{i.0}}/">[Eliminar]</a>
                    </td>
                </tr>
                {% endfor %}
            </table>
            <p><a href="/edit_form/{{ myform }}/add_question/">+ Agregar una pregunta.</a></p>
        {% else %}
            <p>
                El cuestionario no existe.<br />
            </p>
        {% endif %}
            <p>
                Regresa a <a href="/my_forms/" >tus cuestionarios</a>.
            </p>
{% endblock %}
